<template>
    <div class="apply">
        <van-nav-bar :title="'申请' + name" left-arrow @click-left="onClickLeft" />
        <div class="apply_content">
            <div class="apply_title">
                <img src="../../../images/mine/icon_success1.png" alt="">授信需知：
            </div>
            <div class="apply_tips">
                <p>1.该授信额度只能用于自己门店下单，参与排队使用：</p>

                <p>2.该授信额度不可提现；</p>

                <p>3.该额度每个商家只能申请使用一次，如需再次申请，请满足对应的要求后，申请更高一级的额度；</p>

                <p>4.授信额度审批完成之后，需要签署电子合同，电子合同完成后，授信额度会自动到账。</p>
            </div>
            <div class="apply_btn" @click="submit">提交申请</div>
        </div>
    </div>
</template>
<script>
export default {
    data() {
        return {
            name: this.$route.query.name,
            id:this.$route.query.id,
            storeid:this.$route.query.storeid
        }
    },
    mounted() {
        console.log()
        window.document.title = '申请' + this.name
    },
    methods: {
        onClickLeft() {
            this.$router.go(-1)
        },
        submit(){
            this.$http.post(`/store/manage/${this.storeid}/credit_submit`,{config_id:this.id})
				.then(res => {
                   this.$toast.success(res.message)
                   this.$router.go(-1)
				})
        }
    }
}
</script>
<style lang="scss" scoped>
::v-deep .van-icon {
    color: #333333;
}

::v-deep .van-nav-bar__title {
    color: #333333;
}

::v-deep .van-nav-bar__arrow {
    font-size: 20px;
}

::v-deep .van-nav-bar__text {
    color: #333333;
}

.apply {

    // background: ;
    .apply_content {
        padding: .48rem .24rem;

        .apply_title {
            display: flex;
            align-items: center;
            font-family: PingFangSC, PingFang SC;
            font-weight: 500;
            font-size: .32rem;
            color: #333333;
            // line-height: 22px;
            text-align: right;
            font-style: normal;

            img {
                width: .32rem;
                height: .32rem;
                margin-right: .16rem;
            }
        }

        .apply_tips {
            padding-top: .48rem;
            font-family: PingFangSC, PingFang SC;
            font-weight: 400;
            font-size: .28rem;
            color: #333333;
            line-height: .4rem;
            text-align: left;
            font-style: normal;

            p {
                margin-bottom: .4rem;
            }
        }

        .apply_btn {
            width: 80%;
            height: .88rem;
            margin: 0 auto;
            margin-top: 3rem;
            background: linear-gradient(90deg, #4A89EC 0%, #1261E2 100%);
            border-radius: .44rem;
            font-family: PingFangSC, PingFang SC;
            font-weight: 500;
            font-size: .32rem;
            color: #FFFFFF;
            line-height: .88rem;
            text-align: center;
            font-style: normal;
        }
    }
}
</style>